placessidebar: Remove a pointless restriction
authorMatthias Clasen <mclasen@redhat.com>
Sun, 13 Sep 2020 05:14:00 +0000 (01:14 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Sun, 13 Sep 2020 05:14:00 +0000 (01:14 -0400)
The sidebar was refusing to show shortcuts for
things that don't have a local path, for no
good reason.

gtk/gtkplacessidebar.c

index eb49757eef6d0e74a7f9ed631a4faf696af67c70..a6124cc80003933317029cc9cbbeda5089e66846 100644 (file)
@@ -660,22 +660,6 @@ get_desktop_directory_uri (void)
   return g_filename_to_uri (name, NULL, NULL);
 }
 
-static gboolean
-should_show_file (GtkPlacesSidebar *sidebar,
-                  GFile            *file)
-{
-  char *path;
-
-  path = g_file_get_path (file);
-  if (path)
-    {
-      g_free (path);
-      return TRUE;
-    }
-
-  return FALSE;
-}
-
 static gboolean
 file_is_shown (GtkPlacesSidebar *sidebar,
                GFile            *file)
@@ -765,9 +749,6 @@ add_application_shortcuts (GtkPlacesSidebar *sidebar)
 
       g_object_unref (file);
 
-      if (!should_show_file (sidebar, file))
-        continue;
-
       if (file_is_shown (sidebar, file))
         continue;